<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>函数</title>
</head>
<body>

</body>
<script>

    function foo(param1,param2) {
      /*do sth*/
      //return ;
      return obj;
    }

    var boo=function (param1,param2) {
        alert(param1+param2);
    }

  /*  boo(1,2);
    boo(1,'hello')*/

    function map(param1,callback) {
        callback(param1);
    }
    var arr=[1,2,6,4];

    var foo1 = function (item) {
        alert(item.length)
    }
    map(arr,foo1)
  /*  map(arr,function (item) {
        alert(item.length)
    })*/

</script>

</html>